wereldvisiefandomcom_nl-20200214-history
Sjabloon:Navbox with collapsible groups/doc
This template produces a navigation template that has groups of relevant articles on a certain topic. All groups are hidden by default. However, with a parameter call, an individual group can be shown that has the other articles in the same group. Usage Please remove the parameters that are left blank. The template currently supports up to 20 groups/lists but more can be added if needed. You should use a minimum of two groups/lists; otherwise, use instead. | state = } | titlestyle = | title = | image = | listclass = hlist | selected = }}}} | abbr1 = | group1 = | content1 = | abbr2 = | group2 = | content2 = | abbr20 = | group20 = | list20 = }} Parameters This template shares many common parameters with its sister templates and . The common parameters are marked with a cross'†'. Please refer to the documentation of for more in depth descriptions and examples of those parameters. Setup parameters :;name† ::The name of the template. The name of this template, for example, is "Navbox with collapsible groups". :; state† collapsed, plain, off ::The initial state of the show/hide feature for the main title. See for more information. Does not affect display or hiding of group items, see staten, below. :;navbar† ::Possible values are plain, off, and the default value of blank. See for more information. :;border† ::Possible values are child, none, and the default value of blank. Set to child if you wish to use the navbox inside of another navbox; with this option, the child navbox is borderless and fits snuggly inside of its parent navbox. The parent navbox may be the list area of , the columns of a , or a list area of . See for more information and examples. Basic data parameters :;title† ::The title of the template, displayed centered in the titlebar at the top of the template. :;above† ::Text or other elements to appear above groups/lists. :;image† ::Image to the right of all of the groups/lists. :;imageleft† ::Image to the left of all of the groups/lists. :;below† ::Text or other elements to appear below the groups/lists. Group/list parameters :; groupn† :: The title of each section. :; listn† :: The content/wikilinks that will be shown in the group. A or can optionally be used here with its border = child parameter set. If this is done, leave the corresponding groupn blank, as the child navbox will already provide the collapsible feature. :; abbrn :: This is the abbreviation of the group. See selected parameter immediately below to see how to use this parameter. This parameter is optional, but recommended. :; selected :: If the value of selected equals the value of abbrn, then listn is uncollapsed and all other lists are collapsed. If selected is left blank, or if it does not match any abbrn, then all groups are collapsed. Usually this parameter should be set to }. Since this template is a base template for others, there has to be a way to pass the group parameter from the article, to the secondary template to this one. :: The collapsed/uncollapsed options can be listed on the template's page by using the template in the part of the page. :; staten collapsed, plain, off :: The initial collapsible state of listn. Set to collapsed by default. Overridden to uncollapsed if selected equals abbrn. :; imagen :: An image to appear in the listn content area on the right side. :; imageleftn :: An image to appear in the listn content area on the left side. Style parameters :;bodystyle† ::CSS style/s to apply to the entire template :;titlestyle† ::CSS style/s to apply to titlebar; usually background:color. The color of wikilink text must be manually changed using span tags. For example use title = Scouting to change the color of the link to ivory. The show/hide button and the vde link button use the color set in the titlestyle parameter. Here is an example of setting the titlestyle: :::titlestyle = background:darkgreen;color:ivory; :;abovestyle† :;belowstyle† ::CSS style/s to apply to the above and below parameters, respectively. :;basestyle† ::CSS style/s to apply to the title, above, below, and groupn parameters, all at the same time. :;imagestyle† ::CSS style/s to apply to the image parameter. Does not get applied to the imagen parameters. :;imageleftstyle† ::CSS style/s to apply to the imageleft parameter. Does not get applied to the imageleftn parameters. :; groupstyle† :: CSS style/s to apply to all group heading parameters. Visit this website to get a lighter color similar to the title background color. Example: :::groupstyle = background:lightgreen; :; groupn''style† :: CSS style/s to apply to a specific group heading; overrides any CSS styles set in ''groupstyle. :; liststyle† :: CSS style/s to apply to all list content parameters. :; listn''style† :: CSS style/s to apply to specific list content parameters; overrides any CSS styles set in ''liststyle. :; listpadding† :: Padding to have in each list cell; defaults to 0.25em on the left/right and 0em on the top/bottom. Microformat parameters :; bodyclass† :: This parameter is inserted into the "class" attribute for the infobox as a whole. :; titleclass† :: This parameter is inserted into the "class" attribute for the infobox's title caption. :See Wikipedia:WikiProject Microformats for more information on adding microformat information to Wikipedia, and microformat for more information on microformats in general. Examples Basic example } |group1 = Academics |abbr1 = academics |list1 = *College of Engineering *College of Literature, Science and the Arts *Gerald R. Ford School of Public Policy *Law School *Medical School *Ross School of Business *School of Education *School of Information *School of Music, Theatre & Dance *School of Natural Resources and Environment *School of Public Health *Taubman College of Architecture and Urban Planning |group2 = Athletics |abbr2 = athletics |state2 = uncollapsed |list2 = *Michigan Stadium *Crisler Arena *Yost Ice Arena *Michigan Wolverines *Football *UM-OSU Rivalry *Little Brown Jug *Paul Bunyan Trophy *Cold War |group3 = Campus |abbr3 = campus |list3 = *Angell Hall Observatory *Burton Tower *The Diag *Dennison Building *Gerald R. Ford Presidential Library *Hill Auditorium *Lurie Tower *Matthaei Botanical Gardens *Michigan Union *Museums *Nichols Arboretum *UM Health System *University Library }} } |group1 = Academics |abbr1 = academics |list1 = *College of Engineering *College of Literature, Science and the Arts *Gerald R. Ford School of Public Policy *Law School *Medical School *Ross School of Business *School of Education *School of Information *School of Music, Theatre & Dance *School of Natural Resources and Environment *School of Public Health *Taubman College of Architecture and Urban Planning |group2 = Athletics |abbr2 = athletics |state2 = uncollapsed |list2 = *Michigan Stadium *Crisler Arena *Yost Ice Arena *Michigan Wolverines *Football *UM-OSU Rivalry *Little Brown Jug *Paul Bunyan Trophy *Cold War |group3 = Campus |abbr3 = campus |list3 = *Angell Hall Observatory *Burton Tower *The Diag *Dennison Building *Gerald R. Ford Presidential Library *Hill Auditorium *Lurie Tower *Matthaei Botanical Gardens *Michigan Union *Museums *Nichols Arboretum *UM Health System *University Library }} Nesting other Navbox forms This example shows , and all working together. Press the edit button for the section to view the code. Note that each of the child navboxes has the first parameter set to child } |listclass = hlist |group1 = The Scouting Movement |abbr1 = movement |list1 = *Scouting *''Scouting for Boys'' *Scout method *Scout Law *Scout Promise *Scout Motto *Wood Badge *Age groups in Scouting and Guiding *Cub Scout *Boy Scout *Rover Scout *Brownie *Girl Guiding and Girl Scouting *Ranger (Girl Guide) *Jamboree *Scout Leader *WOSM *WAGGGS *Non-aligned organisations *Scouting controversy and conflict *Scouting in popular culture *List of Scouts *List of highest awards in Scouting |list2 = }|french|uncollapsed|collapsed}} |titlestyle = background# |groupstyle = background:lavender; |group1 = Mahgreb |list1 = *Algeria *Morocco (Arguin Island) *Tunisia |group2 = French West Africa |list2 = *Côte d'Ivoire *Dahomey *French Sudan *Guinea *Mauritania *Niger *Senegal *Upper Volta |group3 = |list3 = *French Togoland *James Island |group4 = French Equatorial Africa |list4 = *Chad *Gabon *Middle Congo *Oubangui-Chari |group5 = Comoros |list5 = *Anjouan *Grande Comore *Mohéli |group6 = |list6 = *French Somaliland (Djibouti) *Madagascar *Ile de France *Seychelles }} |group3 = Scouting in the United Kingdom |abbr3 = Scouting |list3 = *The Scout Association *Girlguiding UK *Beaver Scouts *Cub Section (UK) *Venture Scout *Explorer Scouts *Brownie (Girl Guides) *Ranger (Girl Guide) *Rainbow (Girl Guides) *Scout Network *Chief Scout (United Kingdom) *Scout Counties *Scout District *Scout Section (UK) *Scout Activity Centre *Young Leaders |list4 = }|coltest|uncollapsed|collapsed}} |title = Navbox with columns nested in itself |colstyle = text-align:center; |col1width = 33% |col2width = 17% |col3width = 33% |col4width = 17% |col1header = Col1Header |col2header = Col2Header |col3header = Col3Header |col4header = Col4Header |col1 = |col2 = Col2 |col3 = |col4 = Col4 }} }} Nesting Navboxes to get more groups/lists You can conveniently nest Navboxes, including , to get an unlimited number of groups/lists. The following example uses one instance of to get the first 10 collapsible groups, a nested instance to get the next 10, and another nested instance to get the last 6. See the code to learn how it works. It is fairly simple to extend this to as many groups/lists as you like: |state = collapsed |title = Title |selected = } |group1 = A |list1 = List A |group2 = B |list2 = List B |group3 = C |list3 = List C |group4 = D |list4 = List D |group5 = E |list5 = List E |group6 = F |list6 = List F |group7 = G |list7 = List G |group8 = H |list8 = List H |group9 = I |list9 = List I |list10 = } |group1 = J |list1 = List J |group2 = K |list2 = List K |group3 = L |list3 = List L |group4 = M |list4 = List M |group5 = N |list5 = List N |group6 = O |list6 = List O |group7 = P |list7 = List P |group8 = Q |list8 = List Q |group9 = R |list9 = List R |list10 = } |group1 = S |list1 = List S |group2 = T |list2 = List T |group3 = U |list3 = List U |group4 = V |list4 = List V |group5 = W |list5 = List W |group6 = X |list6 = List X |group7 = Y |list7 = List Y |group8 = Z |list8 = List Z }} }} }} See also * * – Provides an explanation of the preferred method of using bullets or pipes to delimit list items.}} Deprecated; use the hlist class. |sandbox|| Category:Navigational boxes Category:Wikipedia metatemplates }} ur:سانچہ:Navbox with collapsible groups